package io;

import com.example.tictactoeandroid.R;

import game.TicTacToeBoard;
import android.view.View; 

public class GUIInputOutput extends InputOutput{
	
	public int move; 
	
	public int getMove(){
		System.out.println("GET MOVE"); 
		return move; 
	}
	
	public boolean getResponse(){
		return true; 
	}
	
	public boolean checkExit(){
		return false; 
	}
	
	public void showBoard(TicTacToeBoard b){
		
	}
	
	public String getFileLocation(){
		String locat = "/Users/MickKellogg/Documents/tictactoehighscores/UserActionLog.rtf"; 
		return locat; 
	}
	
	public String newHighScoreName(){
		return "Joe"; 
	}
	
	public int passMove(View v){
		move = 0;   
		switch(v.getId()){
		case R.id.button1:
			return move; 
		case R.id.button2: 
			move = 1; 
			return move; 
		case R.id.button3:
			move = 2; 
			return move; 
		case R.id.button4:
			move = 3; 
			return move; 
		case R.id.button5:
			move = 4; 
			return move;  
		case R.id.button6:
			move = 5; 
			return move; 
		case R.id.button7: 
			move = 6; 
			return move;   
		case R.id.button8: 
			move = 7; 
			return move;  
		case R.id.button9:
			move = 8; 
			return move; 
			default:
			throw new RuntimeException("unknown button id"); 
		}
	}
} 
